<template>
	<view class="page">
		<template v-if="isLogin">
			<view class="category-list row-3">
				<navigator :url="'/package_project/jc_pro/dataList/dataList?type=all&pro_type=4'" open-type="navigate" hover-class="none" class="item">
					<view class="icon"><image src="@/static/images/datas.png" mode="widthFix"></image></view>
					<view class="text">监测数据</view>
				</navigator>
				<view class="item" @click="openMap" data-type="jc" data-range="all">
					<view class="icon"><image src="@/static/images/mapdata.png" mode="widthFix"></image></view>
					<view class="text">数据地图</view>
				</view>
				<!-- <navigator open-type="navigate" url="/"  hover-class="none" class="item">
					<view class="icon"><image src="@/static/images/yz_export.png" mode="widthFix"></image></view>
					<view class="text">导出数据</view>
				</navigator> -->
			</view>
			<view class="start-btn-area">
				<navigator url="/package_project/jc_pro/jcForm/jcForm?type=publicpc" hover-class="none" class="btn">
					<image src="@/static/images/pc_start.png" mode="widthFix"></image>
				</navigator>
				<view class="name"><text>监测作业</text></view>
			</view>
			
			<!-- <navigator open-type="navigate" url="/package_project/jcForm/jcForm" hover-class="none" class="btn">开始监测</navigator> -->
			 
		</template>
	</view>
</template>

<script>
	import {router} from '@/common/util.js'
	import {
		HTTP_OLD_HOST,
		WEB_HOST
	} from '@/config.js'
	
	export default {
		name: 'name',
		data() {
			return { 
				isLogin: false, 
				userInfo: uni.getStorageSync('userInfo'),
				loginStateUpdate: false,
				app_name: getApp().globalData.app_name 

			}


		},
		async onLoad() {			
			this.isLogin=await this.$loginState('check');  
		},
		async onShow() {

		},
		methods: {
			openMap:function(e){
				let type = e.currentTarget.dataset.type; 
				let range= e.currentTarget.dataset.range; 
				router({
					opentype:'navigate',
					url:'/pages/webview/webview',
					params:{
						dataRange: range,
						memberInfo: "0",
						page_type: "map",
						pid: 0, 
						type: type, 
						uid: this.userInfo.id, 
					}
				})
				
			}
		},
		components: {

		},

		computed: {

		},
		watch: {

		}

	}
</script>

<style lang="less" scoped> 
	.category-list{
		background: #fff;
		margin-bottom: 20rpx;
		padding: 30rpx 0 0;
		.item{
			.icon{
				width: 40%!important;
			}
		}
	}
	.name {
		text-align: center;

		text {
			padding-top: 10rpx;
			border-top: 2rpx dashed #999;
			font-size: 28rpx;
			color: #999;
		}
	}
	.start-btn-area{
		position:absolute;
		left:0;
		bottom:150rpx;
		width:100%;
	}
	
	.btn {
		width: 60%;
		margin: 0 auto;
	
		image {
			width: 100%;
		}
	}

	// .btn {
	// 	border-radius: 50%;
	// 	width: 280rpx;
	// 	height: 280rpx;
	// 	line-height: 280rpx;
	// 	margin: 250rpx auto 0;
	// 	background-image: linear-gradient(to right, #fe5d55, #e2231a);
	// 	box-shadow: 0 0 10rpx #000;
	// 	font-size: 40rpx;
	// 	text-align: center;
	// 	color:#fff;
	// }
	
	
</style>
